package webEquipeRechercheGwt.server.webEquipeRechercheServices;

import webEquipeRechercheGwt.client.entityMirror.PaperMirror;
import webEquipeRechercheGwt.client.entityMirror.PersonMirror;
import webEquipeRechercheGwt.client.entityMirror.SeminarMirror;
import webEquipeRechercheGwt.client.entityMirror.SoftwareMirror;
import webEquipeRechercheGwt.client.entityMirror.TeamMirror;
import webEquipeRechercheGwt.client.services.LinkingService;
import webEquipeRechercheGwt.server.rmiManager.RmiManager;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class LinkingServiceImpl extends RemoteServiceServlet implements
		LinkingService {

	/**
	 * 
	 */
	private static final long serialVersionUID = 5891908654849390314L;

	@Override
	public boolean linkPersonToPaper(PersonMirror p, PaperMirror paper) {
		RmiManager rmi = new RmiManager();
		return rmi.getWebEquipeRechercheFacade().linkPersonToPaper(p, paper);
	}

	@Override
	public boolean linkPersonToSeminar(PersonMirror p, SeminarMirror s) {
		RmiManager rmi = new RmiManager();
		return rmi.getWebEquipeRechercheFacade().linkPersonToSeminar(p, s);
	}

	@Override
	public boolean linkPersonToSoftware(PersonMirror p, SoftwareMirror s) {
		RmiManager rmi = new RmiManager();
		return rmi.getWebEquipeRechercheFacade().linkPersonToSoftware(p, s);
	}

	@Override
	public boolean linkPersonToTeam(PersonMirror p, TeamMirror t) {
		RmiManager rmi = new RmiManager();
		return rmi.getWebEquipeRechercheFacade().linkPersonToTeam(p, t);
	}

}
